FROM openjdk:8-jdk
LABEL maintainer=itonly

#docker run -e PARAMS="--server.port 9090"
#环境变量
ENV PARAMS="--server.port=8080 --spring.profiles.active=prod --spring.cloud.nacos.discovery.server-addr=nacos.one-stop-school:8848 --spring.cloud.nacos.config.server-addr=nacos.one-stop-school:8848 --spring.cloud.nacos.config.namespace=7f859586-f295-4bd1-9fae-cbe38dd1d927 --spring.cloud.nacos.config.file-extension=yml"
RUN /bin/cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone

COPY target/*.jar /app.jar
EXPOSE 8080

#
ENTRYPOINT ["/bin/sh","-c","java -Dfile.encoding=utf8 -Djava.security.egd=file:/dev/./urandom -jar app.jar ${PARAMS}"]